package mysql

import "gorm.io/gorm"

type TopicInfo struct {
	gorm.Model
	TopicName  string `gorm:"type:varchar(30)"`
	TopicIntro string `gorm:"type:text"`
	HotLevel   int    `gorm:"type:int(11)"`
}

func (i *TopicInfo) FirstTopicById(db *gorm.DB, id int) error {
	return db.Debug().Where("id=?", id).First(i).Error
}
